package com.opi.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class Log4JListener implements ServletContextListener {  
   
	public static final String appDir = "appDir";  
    
    public void contextDestroyed(ServletContextEvent servletcontextevent) {  
        System.getProperties().remove(appDir);  
    }  
   
    public void contextInitialized(ServletContextEvent servletcontextevent) {  
    	String appdir = servletcontextevent.getServletContext().getRealPath("/");
    	System.setProperty(appDir, appdir);
    }  
}
